Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #756: don't make the odata request when route is being changed #1042

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sadiqkhoja
Copy link
Contributor

@sadiqkhoja sadiqkhoja commented Oct 18, 2024

Closes central#756

What has been done to verify that this works as intended?

Added couple of tests, also manually verified that issue is fixed.

Why is this the best possible solution? Were any other approaches considered?

Root cause: when user clicks on another page link, query parameter changes, which causes odataFilter watcher in SubmissionList component to send another odata request.

If a route is being changed, hence component is being unmounted then that component should not make a new (update) request.

Another approach was to add null check for _abortController in resource.js:cancelRequest(), which felt like hacky to me. or If _store is being shared like in this case, maybe we can share the _abortController as well; I am not fully certain about its implications though.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Any page that have filters like Entities data and System audit should be tested as well for regressions.

Does this change require updates to user documentation? If so, please file an issue here and include the link below.

NA

Before submitting this PR, please make sure you have:

  • run npm run test and npm run lint and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

…anged

Root cause: when user clicks on another page link, query parameter changes, which causes odataFilter watcher in SubmissionList component to send
another odata request.
@sadiqkhoja sadiqkhoja marked this pull request as ready for review October 23, 2024 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't see test Submissions if filters are selected in Submissions tab
1 participant